package com.esunny.online.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Author: Bcc
 * @Date: 2020/8/7 10:48
 * @Description:
 * @modified By:
 * @version: $
 */
@ApiModel(value = "查询结构体")
public class ResourceListQuery {

    /**
     * 当前页码
     */
    @ApiModelProperty(value = "当前页码")
    private int currentPage;

    /**
     * 起始查询位置
     */
    @ApiModelProperty(value = "起始查询位置")
    private int offset;

    /**
     * 页面数据条数
     */
    @ApiModelProperty(value = "每页数据量")
    private int pageSize;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    private String username;

    /**
     * 资源类型
     */
    @ApiModelProperty(value = "资源类型")
    private String type;

    /**
     * 资源标签
     */
    @ApiModelProperty(value = "资源标签")
    private String tags;

    /**
     * 资源状态
     */
    @ApiModelProperty(value = "资源状态")
    private int status;

    /**
     * 查询条数
     */
    @ApiModelProperty(value = "查询条数")
    private int count;

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset() {
        this.offset = (this.getCurrentPage()-1) * this.pageSize;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "ResourceListQuery{" +
                "currentPage=" + currentPage +
                ", offset=" + offset +
                ", pageSize=" + pageSize +
                ", username='" + username + '\'' +
                ", type='" + type + '\'' +
                ", tags='" + tags + '\'' +
                ", status=" + status +
                ", count=" + count +
                '}';
    }
}
